package com.li.youhappygo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.li.youhappygo.model.entity.order.OrderReceiverInfo;
import com.li.youhappygo.model.entity.user.UserAddress;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.transaction.annotation.Transactional;

@Mapper
public interface OrderReceiverInfoMapper extends BaseMapper<OrderReceiverInfo> {

    @Select("select ua.* " +
            "from order_receiver_info ori join user_address ua on ori.user_address_id = ua.id " +
            "where ori.order_id = #{orderId}")
    UserAddress findUserAddress(Long orderId);
}
